Skip to content

systemvm-registration: update seeded template_store_ref sizes#10317

Merged
DaanHoogland merged 1 commit intoapache:4.19from
LINBIT:update-seeded-template-sizes
Feb 7, 2025
Merged

systemvm-registration: update seeded template_store_ref sizes#10317
DaanHoogland merged 1 commit intoapache:4.19from
LINBIT:update-seeded-template-sizes

Conversation

@rp-
Copy link
Contributor

@rp- rp- commented Feb 3, 2025

Description

Pre-seeded template storages always had there pre initialized 0 sizes and would never be updated.
This makes later problems, when the primary storage should pre-allocate the volume as it doesn't know the size
and would fail or maybe try to delay the allocation until the agent code knows the size.
This updates the sizes from the template.properties files on the validateIfSeeded check.

The issue was found while reviewing #10132

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Started a fresh KVM cluster with preseeded systemvm template from cloud-install-sys-tmplt on Linstor primary storage.

How did you try to break this feature and the system with this change?

Pre-seeded template storages always had there pre initialized 0 sizes
and would never be updated. This updates the sizes from the
template.properties files on the validateIfSeeded check.
@codecov
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 15.16%. Comparing base (c1bc57b) to head (ca6c865).
Report is 9 commits behind head on 4.19.

Files with missing lines Patch % Lines
...om/cloud/upgrade/SystemVmTemplateRegistration.java 0.00% 24 Missing ⚠️
...ain/java/com/cloud/storage/StorageManagerImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10317   +/-   ##
=========================================
  Coverage     15.16%   15.16%           
- Complexity    11302    11303    +1     
=========================================
  Files          5408     5408           
  Lines        473931   473950   +19     
  Branches      57844    57845    +1     
=========================================
+ Hits          71866    71869    +3     
- Misses       394034   394048   +14     
- Partials       8031     8033    +2     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.88% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weizhouapache
Copy link
Member

@rp-
this seems to be an issue with the script cloud-install-sys-tmplt , right ?

@rp-
Copy link
Contributor Author

rp- commented Feb 4, 2025

@rp- this seems to be an issue with the script cloud-install-sys-tmplt , right ?

not directly, as the script only updates the vm_template table and before cloudstack-management hasn't upgraded all the sql, there isn't even a table template_store_ref yet. So you can only fix that issue within the code.

There is this code here:

Which does add the seeded entries, but at that time, no secondary storage is mounted, so you can't get the correct sizes.

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Feb 4, 2025
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@weizhouapache
Copy link
Member

@rp- this seems to be an issue with the script cloud-install-sys-tmplt , right ?

not directly, as the script only updates the vm_template table and before cloudstack-management hasn't upgraded all the sql, there isn't even a table template_store_ref yet. So you can only fix that issue within the code.

There is this code here:

Which does add the seeded entries, but at that time, no secondary storage is mounted, so you can't get the correct sizes.

thanks @rp-

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12323

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@blueorangutan
Copy link

[SF] Trillian test result (tid-12295)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 47219 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10317-t12295-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_12_start_vm_multiple_volumes_allocated Error 15.21 test_vm_life_cycle.py

@rp-
Copy link
Contributor Author

rp- commented Feb 5, 2025

[SF] Trillian test result (tid-12295) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 47219 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10317-t12295-kvm-ol8.zip Smoke tests completed. 132 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_12_start_vm_multiple_volumes_allocated Error 15.21 test_vm_life_cycle.py

Hmm as far as I see the fail comes from a VM i-250-346-VM that couldn't be found in the database?
Not sure if this can be related to this change?

@weizhouapache
Copy link
Member

[SF] Trillian test result (tid-12295) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 47219 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10317-t12295-kvm-ol8.zip Smoke tests completed. 132 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:
Test Result Time (s) Test File
test_12_start_vm_multiple_volumes_allocated Error 15.21 test_vm_life_cycle.py

Hmm as far as I see the fail comes from a VM i-250-346-VM that couldn't be found in the database? Not sure if this can be related to this change?

@rp-
ignore the failure. it is addressed in #10323

@DaanHoogland DaanHoogland merged commit c09720a into apache:4.19 Feb 7, 2025
24 of 25 checks passed
@rp- rp- deleted the update-seeded-template-sizes branch February 13, 2025 08:45
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants